<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <div class="error-code">404</div>
      <h1 class="title">页面未找到</h1>
      <p class="description">抱歉，您访问的页面不存在或已被移除</p>
      <div class="actions">
        <n-button type="primary" @click="goBack">
          <template #icon><n-icon><ArrowBackOutline /></n-icon></template>
          返回上一页
        </n-button>
        <n-button @click="goHome">
          <template #icon><n-icon><HomeOutline /></n-icon></template>
          返回首页
        </n-button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { NButton, NIcon } from 'naive-ui'
import { ArrowBackOutline, HomeOutline } from '@vicons/ionicons5'

const router = useRouter()

const goBack = () => {
  router.back()
}

const goHome = () => {
  router.push('/')
}
</script>

<style lang="scss" scoped>
.not-found-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--body-color);
  
  .not-found-content {
    text-align: center;
    padding: 40px;
    max-width: 480px;
    
    .error-code {
      font-size: 120px;
      font-weight: 700;
      line-height: 1;
      background: linear-gradient(135deg, var(--primary-color), var(--info-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 24px;
    }
    
    .title {
      font-size: 32px;
      font-weight: 600;
      margin-bottom: 16px;
      color: var(--text-color);
    }
    
    .description {
      font-size: 16px;
      color: var(--text-color-secondary);
      margin-bottom: 32px;
    }
    
    .actions {
      display: flex;
      justify-content: center;
      gap: 16px;
    }
  }
}

/* 响应式调整 */
@media (max-width: 576px) {
  .not-found-container {
    .not-found-content {
      padding: 20px;
      
      .error-code {
        font-size: 96px;
      }
      
      .title {
        font-size: 24px;
      }
      
      .description {
        font-size: 14px;
      }
      
      .actions {
        flex-direction: column;
        gap: 12px;
      }
    }
  }
}
</style> 